package deng.hornetq.bugs;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;


public class PriorityConsumerBug3 extends PriorityConsumerBug2 {
	public static void main(String[] args) {
		PriorityConsumerBug3 main = new PriorityConsumerBug3();
		main.run();
	}

	@Override
	protected Connection createConnection() throws Exception {
		ConnectionFactory connectionFactory = null;
		if (System.getProperty("ConnectionFactory.class") != null) {
			Class<?> cfClass = Class.forName(System.getProperty("ConnectionFactoryClass"));
			connectionFactory = (ConnectionFactory)cfClass.newInstance();
			return connectionFactory.createConnection();
		}
		
		return super.createConnection();
	}
}
